# bazel build --enable_bzlmod=false --enable_workspace=true //main:main

# new_local_repository( 
#     name = "eigen3",
#     path = "eigen-3.4.0",           # 指向 Eigen 的源码目录
#     build_file = "//eigen3:BUILD",  # 使用 Bazel label
# )


load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")

EIGEN_COMMIT = "12e8d57108c50d8a63605c6eb0144c838c128337"
EIGEN_SHA256 = "f689246e342c3955af48d26ce74ac34d21b579a00675c341721a735937919b02"

http_archive(
    name = "eigen3",
    build_file = "//eigen3:BUILD",
    sha256 = EIGEN_SHA256,
    strip_prefix = "eigen-{commit}".format(commit = EIGEN_COMMIT),
    urls = [
        "https://storage.googleapis.com/mirror.tensorflow.org/gitlab.com/libeigen/eigen/-/archive/{commit}/eigen-{commit}.tar.gz".format(commit = EIGEN_COMMIT),
        "https://gitlab.com/libeigen/eigen/-/archive/{commit}/eigen-{commit}.tar.gz".format(commit = EIGEN_COMMIT),
    ],
)